﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._21_观察者模式
{
    public interface IOrderSubject
    {
        /// <summary>
        /// 订阅
        /// </summary>
        /// <param name="observer"></param>
        void Attach(IOrderObserver observer);
        /// <summary>
        /// 取消订阅
        /// </summary>
        /// <param name="observer"></param>
        void Detach(IOrderObserver observer);
        /// <summary>
        /// 通知观察者
        /// </summary>
        /// <param name="order"></param>
        void Notify(TOrderModel order);
    }
}
